<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/style.css" />
<script type="text/javascript" src="__TMPL__Common/js/jquery.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.timer.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/script.js"></script>
<script type="text/javascript" src="__ROOT__/admin/Runtime/lang.js"></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/kindeditor.js'></script>
<script type="text/javascript">
 	var VAR_MODULE = "<?php echo conf("VAR_MODULE");?>";
	var VAR_ACTION = "<?php echo conf("VAR_ACTION");?>";
	var MODULE_NAME	=	'<?php echo MODULE_NAME; ?>';
	var ACTION_NAME	=	'<?php echo ACTION_NAME; ?>';
	var ROOT = '__APP__';
	var CURRENT_URL = '<?php echo trim($_SERVER['REQUEST_URI']);?>';
</script>
</head>
<body>
<div id="info"></div>

<script type="text/javascript" src="__TMPL__Common/js/conf.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/calendar/calendar.css" />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/deal.js"></script>
<script type="text/javascript">
	window.onload = function()
	{
		init_dealform();
	}
</script>
<div class="main">
<div class="main_title"><?php echo ($vo["name"]); ?><?php echo L("EDIT");?> <a href="<?php echo u("Deal/index");?>" class="back_list"><?php echo L("BACK_LIST");?></a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<div class="button_row">
	<input type="button" class="button conf_btn" rel="1" value="<?php echo L("DEAL_BASE_INFO");?>" />&nbsp;
	<input type="button" class="button conf_btn" rel="2" value="<?php echo L("DEAL_TIME_NUM");?>" />&nbsp;
	<input type="button" class="button conf_btn" rel="3" value="<?php echo L("DEAL_TYPE_AND_ATTR");?>" />&nbsp;	
	<input type="button" class="button conf_btn" rel="4" value="<?php echo L("SEO_CONFIG");?>" />&nbsp;	
</div>
<div class="blank5"></div>
<table class="form conf_tab" cellpadding=0 cellspacing=0 rel="1">
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_NAME");?>:</td>
		<td class="item_input"><input type="text" class="textbox require" name="name" style="width:500px;" value="<?php echo ($vo["name"]); ?>" /></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_SUB_NAME");?>:</td>
		<td class="item_input"><input type="text" class="textbox require" name="sub_name" value="<?php echo ($vo["sub_name"]); ?>" /> <span class='tip_span'>[<?php echo L("DEAL_SUB_NAME_TIP");?>]</span></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_CODE");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="code" value="<?php echo ($vo["code"]); ?>" /> <span class='tip_span'>[<?php echo L("DEAL_CODE_TIP");?>]</span></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_BRIEF");?>:</td>
		<td class="item_input"><textarea class="textarea" name="brief" ><?php echo ($vo["brief"]); ?></textarea></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("CATE_TREE");?>:</td>
		<td class="item_input">
		<select name="cate_id" class="require">
			<option value="0" <?php if($vo['cate_id'] == 0): ?>selected="selected"<?php endif; ?>>==<?php echo L("NO_SELECT_CATE");?>==</option>
			<?php if(is_array($cate_tree)): foreach($cate_tree as $key=>$cate_item): ?><option value="<?php echo ($cate_item["id"]); ?>" <?php if($vo['cate_id'] == $cate_item['id']): ?>selected="selected"<?php endif; ?>><?php echo ($cate_item["title_show"]); ?></option><?php endforeach; endif; ?>
		</select>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_CITY");?>:</td>
		<td class="item_input">
		<select name="city_id" class="require">
			<option value="0" <?php if($vo['city_id'] == 0): ?>selected="selected"<?php endif; ?>>==<?php echo L("NO_SELECT_CITY");?>==</option>
			<?php if(is_array($city_list)): foreach($city_list as $key=>$city_item): ?><option value="<?php echo ($city_item["id"]); ?>" <?php if($vo['city_id'] == $city_item['id']): ?>selected="selected"<?php endif; ?>><?php echo ($city_item["title_show"]); ?></option><?php endforeach; endif; ?>
		</select>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_SUPPLIER");?>:</td>
		<td class="item_input">
		<select name="supplier_id" class="require">
			<option value="0" <?php if($vo['supplier_id'] == 0): ?>selected="selected"<?php endif; ?>>==<?php echo L("NO_SELECT_SUPPLIER");?>==</option>
			<?php if(is_array($supplier_list)): foreach($supplier_list as $key=>$supplier_item): ?><option value="<?php echo ($supplier_item["id"]); ?>" <?php if($vo['supplier_id'] == $supplier_item['id']): ?>selected="selected"<?php endif; ?>><?php echo ($supplier_item["name"]); ?></option><?php endforeach; endif; ?>
		</select>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_ICON");?>:</td>
		<td class="item_input">
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'icon';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='icon' name='icon' style='width:120px; height:25px;' ><?php echo ($vo["icon"]); ?></textarea> </div></div><img src='<?php if($vo["icon"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($vo["icon"]); ?><?php endif; ?>' <?php if($vo["icon"] != ''): ?>onclick='openimg("icon")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_icon' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($vo["icon"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_icon' onclick='delimg("icon")' title='删除' />
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_IMG");?>:</td>
		<td class="item_input">
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img0';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img0' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["0"]); ?></textarea> </div></div><img src='<?php if($img_list["0"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["0"]); ?><?php endif; ?>' <?php if($img_list["0"] != ''): ?>onclick='openimg("img0")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img0' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["0"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img0' onclick='delimg("img0")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img1';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img1' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["1"]); ?></textarea> </div></div><img src='<?php if($img_list["1"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["1"]); ?><?php endif; ?>' <?php if($img_list["1"] != ''): ?>onclick='openimg("img1")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img1' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["1"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img1' onclick='delimg("img1")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img2';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img2' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["2"]); ?></textarea> </div></div><img src='<?php if($img_list["2"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["2"]); ?><?php endif; ?>' <?php if($img_list["2"] != ''): ?>onclick='openimg("img2")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img2' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["2"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img2' onclick='delimg("img2")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img3';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img3' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["3"]); ?></textarea> </div></div><img src='<?php if($img_list["3"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["3"]); ?><?php endif; ?>' <?php if($img_list["3"] != ''): ?>onclick='openimg("img3")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img3' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["3"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img3' onclick='delimg("img3")' title='删除' />
			<div class="blank5"></div>			
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img4';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img4' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["4"]); ?></textarea> </div></div><img src='<?php if($img_list["4"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["4"]); ?><?php endif; ?>' <?php if($img_list["4"] != ''): ?>onclick='openimg("img4")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img4' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["4"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img4' onclick='delimg("img4")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img5';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img5' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["5"]); ?></textarea> </div></div><img src='<?php if($img_list["5"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["5"]); ?><?php endif; ?>' <?php if($img_list["5"] != ''): ?>onclick='openimg("img5")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img5' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["5"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img5' onclick='delimg("img5")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img6';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img6' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["6"]); ?></textarea> </div></div><img src='<?php if($img_list["6"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["6"]); ?><?php endif; ?>' <?php if($img_list["6"] != ''): ?>onclick='openimg("img6")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img6' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["6"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img6' onclick='delimg("img6")' title='删除' />
			<div style='width:120px; height:40px; margin-left:10px; display:inline-block;  float:left;' class='none_border'><script type='text/javascript'>var eid = 'img7';KE.show({id : eid,items : ['upload_image'],skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div style='font-size:0px;'><textarea id='img7' name='img[]' style='width:120px; height:25px;' ><?php echo ($img_list["7"]); ?></textarea> </div></div><img src='<?php if($img_list["7"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($img_list["7"]); ?><?php endif; ?>' <?php if($img_list["7"] != ''): ?>onclick='openimg("img7")'<?php endif; ?> style='display:inline-block; float:left; cursor:pointer; margin-left:10px; border:#ccc solid 1px; width:35px; height:35px;' id='img_img7' /><img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($img_list["7"] == ''): ?>display:none;<?php else: ?>display:inline-block;<?php endif; ?> margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' id='img_del_img7' onclick='delimg("img7")' title='删除' />
		</td>
	</tr>

	<tr>
		<td class="item_title"><?php echo L("SORT");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="sort" value="<?php echo ($vo["sort"]); ?>" /></td>
	</tr>
	
	<tr>
		<td class="item_title"><?php echo L("IS_EFFECT");?>:</td>
		<td class="item_input">
			<lable><?php echo L("IS_EFFECT_1");?><input type="radio" name="is_effect" value="1" <?php if($vo['is_effect'] == 1): ?>checked="checked"<?php endif; ?> /></lable>
			<lable><?php echo L("IS_EFFECT_0");?><input type="radio" name="is_effect" value="0" <?php if($vo['is_effect'] == 0): ?>checked="checked"<?php endif; ?> /></lable>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_DESCRIPTION");?>:</td>
		<td class="item_input">
			 <script type='text/javascript'> var eid = 'description';KE.show({id : eid,skinType: 'tinymce',allowFileManager : true,resizeMode : 0});</script><div  style='margin-bottom:5px; '><textarea id='description' name='description' style='width:750px; height:350px;' ><?php echo ($vo["description"]); ?></textarea> </div>
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>


<table class="form conf_tab" cellpadding=0 cellspacing=0 rel="2">
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_BEGIN_TIME");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="begin_time" id="begin_time" value="<?php echo ($vo["begin_time"]); ?>" onfocus="this.blur(); return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" />
			<input type="button" class="button" id="btn_begin_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" />	
			<input type="button" class="button" value="<?php echo L("CLEAR_TIME");?>" onclick="$('#begin_time').val('');" />	
			<span class='tip_span'>[<?php echo L("DEAL_BEGIN_TIME_TIP");?>]</span>
		</td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_END_TIME");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="end_time" id="end_time" value="<?php echo ($vo["end_time"]); ?>" onfocus="this.blur(); return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" />
			<input type="button" class="button" id="btn_end_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" />	
			<input type="button" class="button" value="<?php echo L("CLEAR_TIME");?>" onclick="$('#end_time').val('');" />
			<span class='tip_span'>[<?php echo L("DEAL_END_TIME_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_BUY_COUNT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="buy_count" value="<?php echo ($vo["buy_count"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_BUY_COUNT_TIP");?>]</span>
		</td>
	</tr>	
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_MIN_BOUGHT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="min_bought" value="<?php echo ($vo["min_bought"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_MIN_BOUGHT_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_MAX_BOUGHT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="max_bought" value="<?php echo ($vo["max_bought"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_MAX_BOUGHT_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_USER_MIN_BOUGHT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="user_min_bought" value="<?php echo ($vo["user_min_bought"]); ?>" />			
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_USER_MAX_BOUGHT");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="user_max_bought" value="<?php echo ($vo["user_max_bought"]); ?>" /></td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_ORIGIN_PRICE");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="origin_price" value="<?php echo ($vo["origin_price"]); ?>" /></td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_CURRENT_PRICE");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="current_price" value="<?php echo ($vo["current_price"]); ?>" /></td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_DISCOUNT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="discount" value="<?php echo ($vo["discount"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_DISCOUNT_TIP");?>]</span>
		</td>
	</tr>
	<tr class="buy_type_0">
		<td class="item_title"><?php echo L("DEAL_RETURN_MONEY");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="return_money" value="<?php echo ($vo["return_money"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_RETURN_MONEY_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_RETURN_SCORE");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="return_score" value="<?php echo ($vo["return_score"]); ?>" />
			<span class='tip_span'>[<?php echo L("DEAL_RETURN_SCORE_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>

<table class="form conf_tab" cellpadding=0 cellspacing=0 rel="3">
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_IS_COUPON");?>:</td>
		<td class="item_input">
			<select name="is_coupon">
				<option value="0" <?php if($vo['is_coupon'] == 0): ?>selected="selected"<?php endif; ?>><?php echo L("IS_COUPON_0");?></option>
				<option value="1" <?php if($vo['is_coupon'] == 1): ?>selected="selected"<?php endif; ?>><?php echo L("IS_COUPON_1");?></option>
			</select>
		</td>
	</tr>
	
	<tr class="coupon_time">
		<td class="item_title"><?php echo L("DEAL_COUNT_TYPE");?>:</td>
		<td class="item_input">
			<select name="deal_type">
				<option value="0" <?php if($vo['deal_type'] == 0): ?>selected="selected"<?php endif; ?>><?php echo L("COUNT_TYPE_0");?></option>
				<option value="1" <?php if($vo['deal_type'] == 1): ?>selected="selected"<?php endif; ?>><?php echo L("COUNT_TYPE_1");?></option>
			</select>
		</td>
	</tr>
	<tr class="coupon_time">
		<td class="item_title"><?php echo L("DEAL_COUPON_BEGIN_TIME");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="coupon_begin_time" id="coupon_begin_time" value="<?php echo ($vo["coupon_begin_time"]); ?>" onfocus="this.blur(); return showCalendar('coupon_begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_coupon_begin_time');" />
			<input type="button" class="button" id="btn_coupon_begin_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('coupon_begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_coupon_begin_time');" />	
			<input type="button" class="button" value="<?php echo L("CLEAR_TIME");?>" onclick="$('#coupon_begin_time').val('');" />
			<span class='tip_span'>[<?php echo L("DEAL_COUPON_BEGIN_TIME_TIP");?>]</span>
		</td>
	</tr>
	<tr class="coupon_time">
		<td class="item_title"><?php echo L("DEAL_COUPON_END_TIME");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="coupon_end_time" id="coupon_end_time" value="<?php echo ($vo["coupon_end_time"]); ?>" onfocus="this.blur(); return showCalendar('coupon_end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_coupon_end_time');" />
			<input type="button" class="button" id="btn_coupon_end_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('coupon_end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_coupon_end_time');" />	
			<input type="button" class="button" value="<?php echo L("CLEAR_TIME");?>" onclick="$('#coupon_end_time').val('');" />
			<span class='tip_span'>[<?php echo L("DEAL_COUPON_END_TIME_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_IS_DELIVERY");?>:</td>
		<td class="item_input">
			<select name="is_delivery">
				<option value="0" <?php if($vo['is_delivery'] == 0): ?>selected="selected"<?php endif; ?>><?php echo L("IS_DELIVERY_0");?></option>
				<option value="1" <?php if($vo['is_delivery'] == 1): ?>selected="selected"<?php endif; ?>><?php echo L("IS_DELIVERY_1");?></option>
			</select>
			<span class='tip_span'>[<?php echo L("DEAL_IS_DELIVERY_TIP");?>]</span>
		</td>
	</tr>	
	<tr class="weight_row">
		<td class="item_title"><?php echo L("DEAL_WEIGHT");?>:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="weight" value="<?php echo ($vo["weight"]); ?>" />
			<select name="weight_id">
				<?php if(is_array($weight_list)): foreach($weight_list as $key=>$weight_item): ?><option value="<?php echo ($weight_item["id"]); ?>" <?php if($weight_item['id'] == $vo['weight_id']): ?>selected="selected"<?php endif; ?>><?php echo ($weight_item["name"]); ?></option><?php endforeach; endif; ?>				
			</select>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_ALLOW_REFERRAL");?>:</td>
		<td class="item_input">
			<select name="is_referral">
				<option value="0" <?php if($vo['is_referral'] == 0): ?>selected="selected"<?php endif; ?>><?php echo L("ALLOW_REFERRAL_0");?></option>
				<option value="1" <?php if($vo['is_referral'] == 1): ?>selected="selected"<?php endif; ?>><?php echo L("ALLOW_REFERRAL_1");?></option>
			</select>
			<span class='tip_span'>[<?php echo L("DEAL_ALLOW_REFERRAL_TIP");?>]</span>
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>

<table class="form conf_tab" cellpadding=0 cellspacing=0 rel="4">
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_SEO_TITLE");?>:</td>
		<td class="item_input"><textarea class="textarea" name="seo_title" ><?php echo ($vo["seo_title"]); ?></textarea></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_SEO_KEYWORD");?>:</td>
		<td class="item_input"><textarea class="textarea" name="seo_keyword" ><?php echo ($vo["seo_keyword"]); ?></textarea></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("DEAL_SEO_DESCRIPTION");?>:</td>
		<td class="item_input"><textarea class="textarea" name="seo_description" ><?php echo ($vo["seo_description"]); ?></textarea></td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>

<div class="blank5"></div>
	<table class="form" cellpadding=0 cellspacing=0>
		<tr>
			<td colspan=2 class="topTd"></td>
		</tr>
		<tr>
			<td class="item_title"></td>
			<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>" />
			<input type="hidden" name="<?php echo conf("VAR_MODULE");?>" value="Deal" />
			<input type="hidden" name="<?php echo conf("VAR_ACTION");?>" value="update" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="<?php echo L("EDIT");?>" />
			<input type="reset" class="button" value="<?php echo L("RESET");?>" />
			</td>
		</tr>
		<tr>
			<td colspan=2 class="bottomTd"></td>
		</tr>
	</table> 	 
</form>
</div>
</body>
</html>